feat(ledger): expose rebuild-schedule on LedgerClient#132
Merged
Conversation
Adds the new rebuild-schedule operation surface: op_rebuild_schedule, RebuildScheduleRequest, ScheduleCreatedResponse, and the matching OperationEnvelope wrapper. Also refreshes the update-schedule docstrings to point at create-information-block (block_type='schedule').
Wire the new rebuild-schedule operation into the hand-rolled facade as LedgerClient.rebuild_schedule(graph_id, structure_id, *, idempotency_key). Re-runs the schedule generator in place on an existing schedule — preserves the structure id, element associations, and taxonomy while regenerating facts and the obligation chain. Returns ScheduleCreatedResponse.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Regenerates the SDK from the latest OpenAPI spec and wires the new
rebuild-scheduleoperation into the hand-rolledLedgerClientfacade.Without the facade method the regenerated operation would ship but be
unreachable through
LedgerClient.Changes
SDK regeneration (
chore(sdk)commit)rebuild-schedule:api/extensions_robo_ledger/op_rebuild_schedule.py,RebuildScheduleRequest,ScheduleCreatedResponse(+ScheduleCreatedResponseRuleSummaryType0), and theOperationEnvelopeScheduleCreatedResponsewrapper, all re-exported frommodels/__init__.py.update_schedule_arm.py/update_schedule_request.py: the "create a fresh schedule" pointer now referencescreate-information-block(block_type='schedule') instead of the oldcreate-schedule. No facade change needed there —create_schedule()already routes throughop_create_information_block.Facade (
feat(ledger)commit)LedgerClient.rebuild_schedule(graph_id, structure_id, *, idempotency_key=None)in the Schedules section. Re-runs the schedule generator in place on an existing schedule — preserves the structure id, element associations, and taxonomy while voiding the old obligation chain and regenerating facts + a fresh obligation chain. Threads the optionalIdempotency-Keyheader and returnsScheduleCreatedResponsevia the existing typed-envelope unwrap helpers.TestScheduleAdditionalOps: basic call (asserts result,graph_id, request body, andidempotency_key is UNSET) and idempotency-key passthrough.Testing
pytest tests/test_ledger_client.py— 91 passed.ruff checkon the edited files — clean.Notes